package Others;

public class _334_IncreasingTripletSubsequence {
    public boolean increasingTriplet(int[] nums) {
        int big = Integer.MAX_VALUE, small = Integer.MAX_VALUE;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] <= small) {
                small = nums[i];
            } else if (nums[i] <= big) {
                big = nums[i];
            } else {
                return true;
            }
        }
        return false;
    }
}
